package com.xl.base.dbsource;

import com.xl.core.enums.SourceEnum;

/**
 * 根据进入的线程动态赋值数据源KEY
 * 
 * @author 梁华
 * 
 */
public class DynamicDataSourceHolder {
	public static final ThreadLocal<SourceEnum> holder = new ThreadLocal<SourceEnum>();

	public static void putDataSource(SourceEnum sourceEnum) {
		holder.set(sourceEnum);
	}

	public static SourceEnum getDataSouce() {
		return holder.get();
	}
}
